package router

import (
	"github.com/gin-gonic/gin"
	"seat-service/api"
)

type authRouter struct {
}

func (a *authRouter) authRouterGroup(Router *gin.RouterGroup) (auth *gin.RouterGroup) {
	auth = Router.Group("/auth")
	authApi := api.AuthApi{}
	{
		//权限分配
		auth.POST("/casbin/allocate", authApi.AllocateRule) //为role分配或删除权限

		//角色
		auth.POST("/casbin/updateRole", authApi.UpdateUserRole)   //添加用户组策略（casbin添加角色）
		auth.POST("/casbin/getAllRoles", authApi.GetAllRoles)     //条件查询所有角色
		auth.GET("/casbin/getRoleById", authApi.GetRoleById)      //根据id 查询角色信息
		auth.POST("/casbin/changeRole", authApi.ChangeRoleById)   //根据id 修改角色信息
		auth.POST("/casbin/deleteByIds", authApi.DeleteRoleByIds) //批量删除角色信息
	}
	return
}
